﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;
using System.ComponentModel;
using Sirenix.OdinInspector;
using UnityEngine;
using Sirenix.Serialization;

namespace Data
{
    /// <summary>
    /// 一个动作切换到其他动作的 条件逻辑
    /// </summary>
    [Serializable]
    public class ActionInterrupt
    {
        const String CategoryActionSwitch = "动作切换";
        const String CategorySwitchCondition = "切换条件";
        const String CategoryInputOperation = "输入操作";
        const String CategoryDetectType = "检测类型";
        const String CategoryOther = "其它";

        // 动作切换
        String mInterruptName = "";
        String mActionID = "N0000";
        int mActionCache = 0;
       
        int mConnectMode = 0;
        int mConnectTime = 100;
        bool mEnabled = true;
        private int mEnableBegin = 0;
        private int mEnableEnd = 200;
        int mSkillID = 0;
        int mCheckSkillID = 0;
        bool mPlaySkill = true;
        bool mCheckSkillLv = false;
        int mSkillLv = 0;
        int mSkillCompareType = 0;

        // 受到伤害
        bool mHurted = false;
        int mHurtType = 0;
        bool mRemoteOnly = false;
        private bool mCheckAllCondition = false;
        private bool mConditionInterrupte = true;

        int mDetectType;
        // 动作输入1
        bool mCheckInput1 = false;
        int mInputKey1 = 0;
        int mInputType1 = 0;

        // 动作输入2
        bool mCheckInput2 = false;
        int mInputKey2 = 0;
        int mInputType2 = 0;

        // 动作输入3
        bool mCheckInput3 = false;
        int mInputKey3 = 0;
        int mInputType3 = 0;

        // 动作输入4
        bool mCheckInput4 = false;
        int mInputKey4 = 0;
        int mInputType4 = 0;
        //任何情况
        bool mNoInput = false;
        // 接触地面
        bool mTouchGround = false;
        // 接触墙壁
        bool mTouchWall = false;
        // 到达最高点
        bool mReachHighest = false;
        // 单位死亡
        bool mUnitDead = false;
        // 击中目标
        bool mHitTarget = false;
        bool mCheckHitTarget = false;
        String mHitTargetID = "";

        // 抓取结束
        bool mEndCapture = false;
        // 监控变量
        bool mDetectVariable = false;
        int mVariable = 0;
        int mCompareType = 0;
        int mCompareValue = 0;
        // 感觉目标
        bool mSenseTarget = false;
        int mTargetDistanceMin = 0;
        int mTargetDistanceMax = 1000;
        int mTargetLocalAngleMin = 0;
        int mTargetLocalAngleMax = 180;
        int mTargetWorldAngleMin = 0;
        int mTargetWorldAngleMax = 180;
        int mCheckTargetHeight = 0;

        //Buff
        String mBuffListID = "";
        String mBuffListState = "";
        int mCheckBuffID = 0;
        int mCheckBuffState = 0;
        int mCheckAllBuff = 0;


#region "Attributes"
#region 动作切换

        [ShowInInspector, FoldoutGroup("动作切换"), LabelText("中断名称")]
        [XmlAttribute("InterruptName"), DefaultValue(""), DisplayName("中断名称"), Category(CategoryActionSwitch)]
        public String InterruptName { get { return mInterruptName; } set { mInterruptName = value; } }

        [ShowInInspector, FoldoutGroup("动作切换"), LabelText("动作编号")]
        [XmlAttribute("ActionID"), DisplayName("动作编号"), Category(CategoryActionSwitch)]
        public String ActionID { get { return mActionID; } set { mActionID = value; } }

        //[FoldoutGroup("动作切换"),LabelText("替换方式(true : 立即 ; false : 其他)") ]
        [XmlAttribute("ConnectImmediately"), Browsable(false), DefaultValue(true), DisplayName("替换方式"), Category(CategoryActionSwitch)]
        public bool ConnectImmediately { get { return (mConnectMode == 0); } set { mConnectMode = value ? 0 : 1; } }

        [ShowInInspector, FoldoutGroup("动作切换"),LabelText("替换方式"), PropertyTooltip("替换方式(0 当前帧立即替换 ,1 队列下帧处理 , 2 不可替换)")]
        [XmlAttribute("ConnectMode"), DefaultValue(0), DisplayName("替换方式(0 当前帧立即替换 ,1 队列下帧处理 , 2 不可替换)"), Category(CategoryActionSwitch)]
        public int ConnectMode { get { return mConnectMode; } set { mConnectMode = value; } }

        [ShowInInspector, FoldoutGroup("动作切换"),LabelText("替换时间"), PropertyTooltip("替换时间(中断在该动作中触发的时间点%)")]
        [XmlAttribute("ConnectTime"), DefaultValue(100), DisplayName("替换时间"), Category(CategoryActionSwitch)]
        public int ConnectTime { get { return mConnectTime; } set { mConnectTime = value; } }

        [ShowInInspector, FoldoutGroup("动作切换"), LabelText("是否启用")]
        [XmlAttribute("Enabled"), DefaultValue(true), DisplayName("是否启用(开关)"), Category(CategoryActionSwitch)]
        public bool Enabled { get { return mEnabled; } set { mEnabled = value; } }

        [ShowInInspector, FoldoutGroup("动作切换"), LabelText("中断启用起始时间"),]
        [XmlAttribute("EnableBegin"), DefaultValue(0), DisplayName("启用起始时间"), Category(CategoryActionSwitch)]
        public int EnableBegin { get { return mEnableBegin; } set { mEnableBegin = value; } }

        [ShowInInspector, FoldoutGroup("动作切换"), LabelText("中断启用结束时间")]
        [XmlAttribute("EnableEnd"), DefaultValue(200), DisplayName("启用结束时间"), Category(CategoryActionSwitch)]
        public int EnableEnd { get { return mEnableEnd; } set { mEnableEnd = value; } }

#region not useNow
        // [FoldoutGroup("动作切换")]
        [XmlAttribute("CheckSkillID"), DefaultValue(0), DisplayName("检测技能"), Category(CategoryActionSwitch)]
        public int CheckSkillID { get { return mCheckSkillID; } set { mCheckSkillID = value; } }

        // [FoldoutGroup("动作切换")]
        [XmlAttribute("PlaySkill"), DefaultValue(true), DisplayName("使用技能"), Category(CategoryActionSwitch)]
        public bool PlaySkill { get { return mPlaySkill; } set { mPlaySkill = value; } }

        //[FoldoutGroup("动作切换")]
        [XmlAttribute("CheckSkillLv"), DefaultValue(false), DisplayName("检测技能等级"), Category(CategoryActionSwitch)]
        public bool CheckSkillLv { get { return mCheckSkillLv; } set { mCheckSkillLv = value; } }

        //[FoldoutGroup("动作切换")]
        [XmlAttribute("SkillLv"), DefaultValue(0), DisplayName("技能等级"), Category(CategoryActionSwitch)]
        public int SkillLv { get { return mSkillLv; } set { mSkillLv = value; } }

        //[FoldoutGroup("动作切换")]
        [XmlAttribute("SkillCompareType"), DefaultValue(0), DisplayName("技能比较条件"), Category(CategoryActionSwitch)]
        public int SkillCompareType { get { return mSkillCompareType; } set { mSkillCompareType = value; } }
#endregion

#endregion

#region 切换条件
        [ShowInInspector, FoldoutGroup("切换条件"),LabelText("条件中断(true:条件检测,false:用户输入触发中断)"), PropertyTooltip("条件中断(true:条件检测,false:用户输入触发中断)")]
        [XmlAttribute("ConditionInterrupte"), DefaultValue(true), DisplayName("条件中断方式(用户输入触发中断)"), Category(CategorySwitchCondition)]
        public bool ConditionInterrupte { get { return mConditionInterrupte; } set { mConditionInterrupte = value; } }

        [ShowInInspector, FoldoutGroup("切换条件"), LabelText("切换条件"), PropertyTooltip("切换条件 true：所有需要检测的状态满足，false ： 一个需要检测的状态满足即可")]
        [XmlAttribute("CheckAllCondition"), DefaultValue(false), DisplayName("切换条件"), Category(CategorySwitchCondition)]
        public bool CheckAllCondition { get { return mCheckAllCondition; } set { mCheckAllCondition = value; } }
#endregion

#region 检测类型
        //[FoldoutGroup("检测类型")]
        [XmlAttribute("DetectType"), DefaultValue(0), DisplayName("监控目标类型1"), Category(CategoryDetectType)]
        public int DetectType { get { return mDetectType; } set { mDetectType = value; } }
#endregion

#region 输入操作
        [InfoBox(@"按键检测(条件检测先检测按键,再进行切换条件(CheckAllCondition)检测.通过状态检测再进行切换,立即切换当前帧切换，不是等待队列，或者无法切换.        没有按键输入： 直接算输入条件达成，进行状态检测 。 有按键输入 ： 状态一、 输入操作1 ( false : 不进行任输入检测，直接跳过该中断 ; true : 如果有按键状态的话 , 按通用按键状态判断当前输入 ， 没有按键状态的话 , 按SkillID 进行技能触发。  状态二 、 输入操作1 走按键输入 ，并且不是技能输入的话 ： 输入操作2 -> true | 4 个输入满足其一算达成输入 ;  输入操作2 -> false | 四个操作同时满足算达成 (同时达成时 , 输入状态 为空时 也算达成输入条件 );  )")]
        [ShowInInspector, FoldoutGroup("输入操作"), LabelText("没有按键输入")]
        [XmlAttribute("NoInput"), DefaultValue(false), DisplayName("任何情况"), Category(CategoryInputOperation)]
        public bool NoInput { get { return mNoInput; } set { mNoInput = value; } }

#region input1
        bool InputVisible()
        {
            return NoInput == false;
        }
       static  ValueDropdownList<int> inputType = new ValueDropdownList<int>() {
            { "单击（键盘：按下瞬间）"  ,   0 },
            { "双击（键盘：双击瞬间）"  ,   1 },
            { "长按（键盘）"            ,   2 },
            { "松开（键盘：松开瞬间）"  ,   3 },
            { "按下（键盘的状态）"      ,   4 },
            { "松开（键盘的状态）"      ,   5 }
        };
        static ValueDropdownList<int> inputkey =new ValueDropdownList < int >{
             {"(无)None"  ,                    0 },
             {"(普通攻击)Attack"  ,            1 },
             {"(特殊攻击)SpAttack"  ,          2 },
             {"(技能)Skill"  ,                 3 },
             {"(移动)Move"  ,                  4 },
             {"(跳跃)Jump"  ,                  5 },
             {"(抓取)Grab"  ,                  6 },
             {"(朝前)Front"  ,                 7 },
             {"(朝后)Back"  ,                  8 },
             {"()Last"  ,                      9 },
             {"(辅助)Auxiliary"  ,             10 },
            };
        private bool KeySkillUse()
        {
            return InputKey1 == 0 && CheckInput1==true && InputVisible();
        }

        [ShowInInspector, FoldoutGroup("输入操作"),LabelText("输入操作1(false:不进行任输入检测，直接跳过该中断)"),ShowIf("InputVisible", true)]
        [XmlAttribute("CheckInput1"), DefaultValue(false), DisplayName("输入操作1"), Category(CategoryInputOperation)]
        public bool CheckInput1 { get { return mCheckInput1; } set { mCheckInput1 = value; } }

        [ShowInInspector, FoldoutGroup("输入操作"), LabelText("  呼叫技能"), ShowIf("KeySkillUse", true)]
        [XmlAttribute("SkillID"), DefaultValue(0), DisplayName("呼叫技能"), Category(CategoryActionSwitch)]
        public int SkillID { get { return mSkillID; } set { mSkillID = value; } }

        [ShowInInspector, FoldoutGroup("输入操作"), LabelText("  按钮类型"), ShowIf("InputVisible", true), ValueDropdown("inputkey")]
        [XmlAttribute("InputKey1"), DefaultValue(0), DisplayName("按钮类型"), Category(CategoryInputOperation)]
        public int InputKey1 { get { return mInputKey1; } set { mInputKey1 = value; } }

        [ShowInInspector, FoldoutGroup("输入操作"), LabelText("  按钮状态"), ShowIf("InputVisible", true),  ValueDropdown("inputType")]
        [XmlAttribute("InputType1"), DefaultValue(0), DisplayName("按钮状态"), Category(CategoryInputOperation)]
        public int InputType1 { get { return mInputType1; } set { mInputType1 = value; } }
#endregion

#region Input2
        [ShowInInspector, FoldoutGroup("输入操作"), LabelText("输入操作2"), ShowIf("InputVisible", true) ]
        [XmlAttribute("CheckInput2"), DefaultValue(false), DisplayName("输入操作2"), Category(CategoryInputOperation)]
        public bool CheckInput2 { get { return mCheckInput2; } set { mCheckInput2 = value; } }

        [ShowInInspector, FoldoutGroup("输入操作"), LabelText("  按钮2"), ShowIf("InputVisible", true), ValueDropdown("inputkey")]
        [XmlAttribute("InputKey2"), DefaultValue(0), DisplayName("按钮2"), Category(CategoryInputOperation)]
        public int InputKey2 { get { return mInputKey2; } set { mInputKey2 = value; } }

        [ShowInInspector, FoldoutGroup("输入操作"), LabelText("  按钮状态2"), ShowIf("InputVisible", true),  ValueDropdown("inputType")]
        [XmlAttribute("InputType2"), DefaultValue(0), DisplayName("按钮状态2"), Category(CategoryInputOperation)]
        public int InputType2 { get { return mInputType2; } set { mInputType2 = value; } }
#endregion

#region Input3
        [ShowInInspector, FoldoutGroup("输入操作"), LabelText("输入操作3"), ShowIf("InputVisible", true), ]
        [XmlAttribute("CheckInput3"), DefaultValue(false), DisplayName("输入操作3"), Category(CategoryInputOperation)]
        public bool CheckInput3 { get { return mCheckInput3; } set { mCheckInput3 = value; } }

        [ShowInInspector, FoldoutGroup("输入操作"), LabelText("  按钮3"), ShowIf("InputVisible", true), ValueDropdown("inputkey")]
        [XmlAttribute("InputKey3"), DefaultValue(0), DisplayName("按钮3"), Category(CategoryInputOperation)]
        public int InputKey3 { get { return mInputKey3; } set { mInputKey3 = value; } }

        [ShowInInspector, FoldoutGroup("输入操作"), LabelText("  按钮状态3"), ShowIf("InputVisible", true),  ValueDropdown("inputType")]
        [XmlAttribute("InputType3"), DefaultValue(0), DisplayName("按钮状态3"), Category(CategoryInputOperation)]
        public int InputType3 { get { return mInputType3; } set { mInputType3 = value; } }

#endregion

#region Input4
        [ShowInInspector, FoldoutGroup("输入操作"), LabelText("输入操作4"), ShowIf("InputVisible", true)]
        [XmlAttribute("CheckInput4"), DefaultValue(false), DisplayName("输入操作4"), Category(CategoryInputOperation)]
        public bool CheckInput4 { get { return mCheckInput4; } set { mCheckInput4 = value; } }

        [ShowInInspector, FoldoutGroup("输入操作"), LabelText("  按钮4"), ShowIf("InputVisible", true),  ValueDropdown("inputkey")]
        [XmlAttribute("InputKey4"), DefaultValue(0), DisplayName("按钮4"), Category(CategoryInputOperation)]
        public int InputKey4 { get { return mInputKey4; } set { mInputKey4 = value; } }

        [ShowInInspector, FoldoutGroup("输入操作"), LabelText("  按钮状态4"), ShowIf("InputVisible", true), ValueDropdown("inputType")]
        [XmlAttribute("InputType4"), DefaultValue(0), DisplayName("按钮状态4"), Category(CategoryInputOperation)]
        public int InputType4 { get { return mInputType4; } set { mInputType4 = value; } }
#endregion

#endregion

#region 其他

        [ShowInInspector, FoldoutGroup("条件检测的状态"),InfoBox("只对开启的状态进行条件达成检测"),LabelText("接触地面检测")]
        [XmlAttribute("TouchGround"), DefaultValue(false), DisplayName("接触地面"), Category(CategoryOther)]
        public bool TouchGround { get { return mTouchGround; } set { mTouchGround = value; } }

        [ShowInInspector, FoldoutGroup("条件检测的状态"),LabelText("接触墙壁")]
        [XmlAttribute("TouchWall"), DefaultValue(false), DisplayName("接触墙壁"), Category(CategoryOther)]
        public bool TouchWall { get { return mTouchWall; } set { mTouchWall = value; } }

        [ShowInInspector, FoldoutGroup("条件检测的状态"),LabelText("到达最高点")]
        [XmlAttribute("ReachHighest"), DefaultValue(false), DisplayName("到达最高点"), Category(CategoryOther)]
        public bool ReachHighest { get { return mReachHighest; } set { mReachHighest = value; } }

        [ShowInInspector, FoldoutGroup("条件检测的状态"), LabelText("单位死亡")]
        [XmlAttribute("UnitDead"), DefaultValue(false), DisplayName("单位死亡"), Category(CategoryOther)]
        public bool UnitDead { get { return mUnitDead; } set { mUnitDead = value; } }

        [ShowInInspector, FoldoutGroup("条件检测的状态"), LabelText("击中目标")]
        [XmlAttribute("HitTarget"), DefaultValue(false), DisplayName("击中目标"), Category(CategoryOther)]
        public bool HitTarget { get { return mHitTarget; } set { mHitTarget = value; } }

        [ShowInInspector, FoldoutGroup("条件检测的状态"),LabelText("抓取结束")]
        [XmlAttribute("EndCapture"), DefaultValue(false), DisplayName("抓取结束"), Category(CategoryOther)]
        public bool EndCapture { get { return mEndCapture; } set { mEndCapture = value; } }

#region 状态·检测击中目标
        [ShowInInspector, FoldoutGroup("条件检测的状态"), LabelText("检测击中目标")]
        [XmlAttribute("CheckHitTarget"), DefaultValue(false), DisplayName("检测击中目标"), Category(CategoryOther)]
        public bool CheckHitTarget { get { return mCheckHitTarget; } set { mCheckHitTarget = value; } }

        [ShowInInspector, FoldoutGroup("条件检测的状态"), LabelText("   击中目标ID"),ShowIf("CheckHitTarget" , true)]
        [XmlAttribute("HitTargetID"), DefaultValue(""), DisplayName("击中目标ID"), Category(CategoryOther)]
        public String HitTargetID { get { return mHitTargetID; } set { mHitTargetID = value; } }
#endregion

#region 状态·感觉目标
        [ShowInInspector, FoldoutGroup("条件检测的状态"),LabelText("感觉目标")]
        [XmlAttribute("SenseTarget"), DefaultValue(false), DisplayName("感觉目标"), Category(CategoryOther)]
        public bool SenseTarget { get { return mSenseTarget; } set { mSenseTarget = value; } }

        [ShowInInspector, FoldoutGroup("条件检测的状态"), LabelText("   目标距离最小值"),ShowIf("SenseTarget",true)]
        [XmlAttribute("TargetDistanceMin"), DefaultValue(0), DisplayName("目标距离最小值"), Category(CategoryOther)]
        public int TargetDistanceMin { get { return mTargetDistanceMin; } set { mTargetDistanceMin = value; } }

        [ShowInInspector, FoldoutGroup("条件检测的状态"), LabelText("   目标距离最大值"), ShowIf("SenseTarget", true)]
        [XmlAttribute("TargetDistanceMax"), DefaultValue(10000), DisplayName("目标距离最大值"), Category(CategoryOther)]
        public int TargetDistanceMax { get { return mTargetDistanceMax; } set { mTargetDistanceMax = value; } }

        [ShowInInspector, FoldoutGroup("条件检测的状态"), LabelText("   目标朝向夹角最小值"), ShowIf("SenseTarget", true)]
        [XmlAttribute("TargetLocalAngleMin"), DefaultValue(0), DisplayName("目标朝向夹角最小值"), Category(CategoryOther)]
        public int TargetLocalAngleMin { get { return mTargetLocalAngleMin; } set { mTargetLocalAngleMin = value; } }

        [ShowInInspector, FoldoutGroup("条件检测的状态"), LabelText("   目标朝向夹角最大值"), ShowIf("SenseTarget", true)]
        [XmlAttribute("TargetLocalAngleMax"), DefaultValue(180), DisplayName("目标朝向夹角最大值"), Category(CategoryOther)]
        public int TargetLocalAngleMax { get { return mTargetLocalAngleMax; } set { mTargetLocalAngleMax = value; } }

        [ShowInInspector, FoldoutGroup("条件检测的状态"), LabelText("   目标位置夹角最小值"), ShowIf("SenseTarget", true)]
        [XmlAttribute("TargetWorldAngleMin"), DefaultValue(0), DisplayName("目标位置夹角最小值"), Category(CategoryOther)]
        public int TargetWorldAngleMin { get { return mTargetWorldAngleMin; } set { mTargetWorldAngleMin = value; } }

        [ShowInInspector, FoldoutGroup("条件检测的状态"), LabelText("   目标位置夹角最大值"), ShowIf("SenseTarget", true)]
        [XmlAttribute("TargetWorldAngleMax"), DefaultValue(180), DisplayName("目标位置夹角最大值"), Category(CategoryOther)]
        public int TargetWorldAngleMax { get { return mTargetWorldAngleMax; } set { mTargetWorldAngleMax = value; } }

        [ShowInInspector, FoldoutGroup("条件检测的状态"), LabelText("   检查目标高度"), ShowIf("SenseTarget", true)]
        [XmlAttribute("CheckTargetHeight"), DefaultValue(0), DisplayName("检查目标高度"), Category(CategoryOther)]
        public int CheckTargetHeight { get { return mCheckTargetHeight; } set { mCheckTargetHeight = value; } }
#endregion

#region 被攻击时·状态中断检测·受到伤害(OnHit)
        [ShowInInspector, FoldoutGroup("条件检测的状态"),LabelText("受到伤害")]
        [XmlAttribute("Hurted"), DefaultValue(false), DisplayName("受到伤害"), Category(CategoryOther)]
        public bool Hurted { get { return mHurted; } set { mHurted = value; } }

        [ShowInInspector, FoldoutGroup("条件检测的状态"), LabelText("   受到伤害种类"),ShowIf("Hurted",true)]
        [XmlAttribute("HurtType"), DefaultValue(0), DisplayName("受到伤害种类"), Category(CategoryOther)]
        public int HurtType { get { return mHurtType; } set { mHurtType = value; } }

        [ShowInInspector, FoldoutGroup("条件检测的状态"), LabelText("   仅远程攻击"), ShowIf("Hurted", true)]
        [XmlAttribute("RemoteOnly"), DefaultValue(false), DisplayName("仅远程攻击"), Category(CategoryOther)]
        public bool RemoteOnly { get { return mRemoteOnly; } set { mRemoteOnly = value; } }
#endregion

#region 状态·监控变量
        [ShowInInspector, FoldoutGroup("条件检测的状态"), LabelText("监控变量")]
        [XmlAttribute("DetectVariable"), DefaultValue(false), DisplayName("监控变量"), Category(CategoryOther)]
        public bool DetectVariable { get { return mDetectVariable; } set { mDetectVariable = value; } }

        [ShowInInspector, FoldoutGroup("条件检测的状态"), LabelText("   监控变量名称"), ShowIf("DetectVariable", true)]
        [XmlAttribute("Variable"), DefaultValue(0), DisplayName("监控变量名称"), Category(CategoryOther)]
        public int Variable { get { return mVariable; } set { mVariable = value; } }

        [ShowInInspector, FoldoutGroup("条件检测的状态"), LabelText("   监控变量比较条件"), ShowIf("DetectVariable", true)]
        [XmlAttribute("CompareType"), DefaultValue(0), DisplayName("监控变量比较条件"), Category(CategoryOther)]
        public int CompareType { get { return mCompareType; } set { mCompareType = value; } }

        [ShowInInspector, FoldoutGroup("条件检测的状态"), LabelText("   监控变量比较数值"), ShowIf("DetectVariable", true)]
        [XmlAttribute("CompareValue"), DefaultValue(0), DisplayName("监控变量比较数值"), Category(CategoryOther)]
        public int CompareValue { get { return mCompareValue; } set { mCompareValue = value; } }
#endregion

#region 状态·检测buff
       // [FoldoutGroup("条件检测的状态")]
        [XmlAttribute("CheckBuffID"), DefaultValue(0), DisplayName("检测BufferID"), Category(CategoryOther)]
        public int CheckBuffID { get { return mCheckBuffID; } set { mCheckBuffID = value; } }

       // [FoldoutGroup("条件检测的状态")]
        [XmlAttribute("CheckBuffState"), DefaultValue(0), DisplayName("检测Buffer状态"), Category(CategoryOther)]
        public int CheckBuffState { get { return mCheckBuffState; } set { mCheckBuffState = value; } }

      //  [FoldoutGroup("条件检测的状态")]
        [XmlAttribute("CheckAllBuff"), DefaultValue(0), DisplayName("检查所有Buffer"), Category(CategoryOther)]
        public int CheckAllBuff { get { return mCheckAllBuff; } set { mCheckAllBuff = value; } }

       // [FoldoutGroup("条件检测的状态")]
        [XmlAttribute("BuffListID"), DefaultValue(""), DisplayName("中断buff ID"), Category(CategoryOther)]
        public String BuffListID { get { return mBuffListID; } set { mBuffListID = value; } }

      //  [FoldoutGroup("条件检测的状态")]
        [XmlAttribute("BuffListState"), DefaultValue(""), DisplayName("中断buff状态"), Category(CategoryOther)]
        public String BuffListState { get { return mBuffListState; } set { mBuffListState = value; } }
#endregion

#endregion
#endregion
        //TODO?
        
        [XmlAttribute("ActionCache"), DefaultValue(0)]
        public int ActionCache { get { return mActionCache; } set { mActionCache = value; } }

        public override string ToString()
        {
            return mActionID + "(" + mInterruptName + ")";
        }
    }
}
